@import '@/assets/styles/variables.less';
@cur-primary-color: #b2e281;
.chat_notice {
	width: 100%;
	color: @primary-color;
	text-align: center;
	margin-top: 0.1rem;
	margin-bottom: 0.1rem;
	span {
		background-color: #cecece;
		line-height: 0.25rem;
		border-radius: 0.02rem;
		padding: 0.01rem 0.05rem;
		font-size: 0.12rem;
	}
}
.chat_item_content {
	width: 100%;
	display: flex;
	.avatar {
		display: flex;
		justify-content: center;
		img {
			width: 0.35rem;
			height: 0.35rem;
		}
	}
	.content_text {
		display: block;
		position: relative;
		max-width: 3rem;
		padding: 0.05rem;
		word-wrap: break-word;
		white-space: pre-wrap;
		border-radius: 0.04rem;
		flex-shrink: 0;
		min-height: 0.35rem;
		align-self: flex-start;
	}
	.content_text::before {
		content: '';
		display: inline-block;
		width: 0;
		height: 0;
		border: 0.1rem solid transparent;
		position: absolute;
		top: 0.05rem;
	}
	.content_video {
		object-fit: cover;
		position: relative;
		text-align: center;
		img {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			width: 0.3rem;
			height: 0.3rem;
			cursor: pointer;
		}
	}
	.content_file {
		width: 1.8rem;
		height: 0.7rem;
		display: flex;
		background-color: @primary-color;
		position: relative;
		.content_file_name {
			flex: 1.5;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;
			span:nth-child(1) {
				font-size: 0.16rem;
				color: @font-color;
				padding-left: 0.1rem;
				max-width: 1.08rem;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}
			span:nth-child(2) {
				font-size: 0.12rem;
				color: @font-color-lightest;
			}
		}
		.content_file_img {
			flex: 1;
			display: flex;
			justify-content: center;
			align-items: center;
			img {
				width: 0.4rem;
			}
		}
	}
	.content_file::before {
		content: '';
		display: inline-block;
		width: 0;
		height: 0;
		border: 0.1rem solid transparent;
		position: absolute;
		top: 0.05rem;
	}
	.content_file:hover {
		background-color: @shadow-border_bg-color;
		cursor: pointer;
	}
	.content_delete {
		flex-direction: column;
		justify-content: center;
		align-items: center;
		color: @font-color-lightest;
		img {
			width: 0.4rem;
		}
	}
	.content_delete:hover {
		background-color: @primary-color;
		cursor: default;
	}
}
.other {
	justify-content: flex-start;
	.avatar {
		margin-left: 0.2rem;
	}
	.content_text {
		background: @primary-color;
		margin-left: 0.1rem;
	}
	.content_text::before {
		border-right: 0.08rem solid @primary-color;
		left: -0.17rem;
	}
	.content_video {
		margin-left: 0.1rem;
	}
	.content_file {
		margin-left: 0.1rem;
	}
	.content_file::before {
		border-right: 0.08rem solid @primary-color;
		left: -0.17rem;
	}
	:global {
		.content_image {
			margin-left: 0.1rem;
		}
	}
}
.self {
	justify-content: flex-end;
	.avatar {
		margin-right: 0.2rem;
	}
	.content_text {
		background: @cur-primary-color;
		margin-right: 0.1rem;
	}
	.content_text::before {
		display: inline-block;
		width: 0;
		height: 0;
		border: 0.1rem solid transparent;
		border-left: 0.08rem solid @cur-primary-color;
		position: absolute;
		right: -0.17rem;
		top: 0.05rem;
	}
	.content_video {
		margin-right: 0.1rem;
	}
	.content_file {
		margin-right: 0.1rem;
	}
	.content_file::before {
		display: inline-block;
		width: 0;
		height: 0;
		border: 0.1rem solid transparent;
		border-left: 0.08rem solid @primary-color;
		position: absolute;
		right: -0.17rem;
		top: 0.05rem;
	}
	:global {
		.content_image {
			margin-right: 0.1rem;
		}
	}
}
